package com.puboot.module.blog.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.puboot.common.constants.BaseConstants;
import com.puboot.common.util.CoreConst;
import com.puboot.common.util.ResultUtil;
import com.puboot.module.blog.mapper.CompanyMapper;
import com.puboot.module.blog.model.Company;
import com.puboot.module.blog.model.Customer;
import com.puboot.module.blog.service.CompanyService;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;
import org.checkerframework.checker.units.qual.C;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;

import static org.apache.shiro.crypto.hash.Sha256Hash.ALGORITHM_NAME;

@Service
@AllArgsConstructor
public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> implements CompanyService {
    @Override
    public Company getByName(String companyname) {
        QueryWrapper<Company> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("name", companyname);
        return baseMapper.selectOne(queryWrapper);
    }


}
